#!/bin/bash

# script to execute and analyse the output of the
# scriptBlackBoxTestsTableTranscriber

mv script_testesBlackBoxTesseractExecutor ..

cd ..

sh script_testesBlackBoxTesseractExecutor.sh > executableBlackBoxTests/logScriptBlackBoxTestsTesseractExecutor.txt 

mv script_testesBlackBoxTesseractExecutor.sh executableBlackBoxTests/

cd executableBlackBoxTests/

numTestsGroups=`grep -c "Test" logScriptBlackBoxTestsTesseractExecutor.txt`
numErrors=`grep -c "Your entry to this table is invalid. To be valid it need be a rectangle. The system will be closed." logScriptBlackBoxTestsTableTranscriber.txt`

numTests=$(echo "scale=4; $numTestsGroups * 5" | bc)

echo "Results: ------------------------------------"
echo "Number of errors/Number of tests = $numErrors/$numTests"
echo "--------------------------------------------"

